tests/installed: Add a free-space success path test
authorColin Walters <walters@verbum.org>
Mon, 18 Jun 2018 15:11:21 +0000 (11:11 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 19 Jun 2018 18:29:31 +0000 (18:29 +0000)
We implicitly test the success percent path a lot, but not the
absolute path.

Closes: #1632
Approved by: jlebon

tests/installed/nondestructive/itest-pull-space.sh

index bb3f1546cdecb27b1dbfe91f526cb64c28cde4e8..8fcf1e8a57f94ad8c3c9c31b070635d7cbf8d244 100755 (executable)
@@ -35,8 +35,17 @@ if ostree --repo=mnt/repo pull-local /ostree/repo ${host_commit} 2>err.txt; then
     fatal "succeeded in doing a pull with no free space"
 fi
 assert_file_has_content err.txt "min-free-space-size"
-echo "ok min-free-space-size"
+echo "ok min-free-space-size (error)"
 
 umount mnt
 losetup -d ${blkdev}
+rm testblk.img
+
+# min-free-space-size success
+ostree --repo=repo init --mode=bare-user
+echo 'fsync=false' >> repo/config
+echo 'min-free-space-size=1MB' >> repo/config
+ostree --repo=repo pull-local /ostree/repo ${host_commit}
+echo "ok min-free-space-size (success)"
+
 date